package icu.guodapeng.website.controller

import org.springframework.beans.factory.annotation.Autowired
import org.springframework.core.env.Environment
import org.springframework.web.bind.annotation.GetMapping
import org.springframework.web.bind.annotation.PathVariable
import org.springframework.web.bind.annotation.RestController

@RestController
class WebController {
    @Autowired
    private lateinit var env: Environment

    @GetMapping("/echo/{param}")
    fun echo(@PathVariable param: String) = "Website service: $param. mark: ${env.getProperty("mark")}"
}